Skip to content

fix(features): open feature permalinks for features beyond the first …#7839

Open
narendraio wants to merge 1 commit into
Flagsmith:mainfrom
narendraio:fix/4239-feature-permalink-pagination
Open

fix(features): open feature permalinks for features beyond the first …#7839
narendraio wants to merge 1 commit into
Flagsmith:mainfrom
narendraio:fix/4239-feature-permalink-pagination

Conversation

@narendraio

Copy link
Copy Markdown

Description (replace the blank template with this):

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #4239

A feature permalink (?feature=<id>) is opened by the matching FeatureRow's
own effect, but rows are only rendered for the current page of results. When the
linked feature lives on a later page no row exists, so the permalink was a no-op
and the user simply landed on the first page.

This adds a FeaturePermalinkHandler that, when the linked feature is not
present on the current page, fetches the feature and its environment feature
state and renders a single hidden FeatureRow — reusing the existing
panel-opening logic rather than duplicating it.

How did you test this code?

Manually:

  1. Open a project/environment with more than 50 features (so the list paginates).
  2. Copy a permalink to a feature that lives on the second page or later, e.g.
    /project/<id>/environment/<key>/features?feature=<id>&tab=value.
  3. Open the link in a new tab — the feature panel now opens directly, instead of
    landing on the first page with nothing open.
  4. Confirm permalinks to features on the first page still open as before.

Also ran npm run typecheck and eslint on the changed files (no new errors).

…page

A feature permalink (`?feature=<id>`) is opened by the matching `FeatureRow`'s
own effect, but rows are only rendered for the current page of results. When
the linked feature lives on a later page no row exists, so the permalink was a
no-op and the user simply landed on the first page.

Add a `FeaturePermalinkHandler` that, when the linked feature is not present on
the current page, fetches the feature and its environment feature state and
renders a single hidden `FeatureRow`, reusing the existing panel-opening logic
rather than duplicating it.

Closes Flagsmith#4239
@narendraio narendraio requested a review from a team as a code owner June 19, 2026 18:01
@narendraio narendraio requested review from kyle-ssg and removed request for a team June 19, 2026 18:01
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@narendraio is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permalinks to features do not work if the feature is after the first page

2 participants